package com.wdg.utils;

import com.alibaba.fastjson.JSONObject;
import com.wdg.common.userInfo.UserInfo;

import java.util.Base64;

public class Base64Util {

    public static UserInfo decrypt(String token){
        //Base64解码
        byte[] decodedBytes = Base64.getDecoder().decode(token);
        String decodedString = new String(decodedBytes);
        return JSONObject.parseObject(decodedString, UserInfo.class);
    }
}
